﻿using System;

namespace 接口
{
    //关键字interface
    internal class Program
    {
        private static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Person kun = new Person();
            kun.SingDanceRapBasketball();
        }
    }

    public class Person : IKun
    {
        public string Name { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

        public void SingDanceRapBasketball()
        {
            Console.WriteLine("鸡你太美");
        }
    }

    public interface IKun
    {
        //不能包含实例字段
        //string _name;

        //自动属性可以
        string Name
        {
            get; set;
        }

        //接口中成员不允许出现访问修饰符，默认就是public
        void SingDanceRapBasketball();
    }
}